const clearStorage = () => {
  localStorage.clear();
};

const setStorageItem = (name, params) => {
  localStorage.setItem(name, JSON.stringify(params));
};

const getStorageItem = (name) => {
  const item = localStorage.getItem(name);
  return item ? JSON.parse(item) : null;
};


const removeStorageItem = (name) => {
  localStorage.removeItem(name);
};

export {
  clearStorage, setStorageItem, getStorageItem, removeStorageItem,
};
